# pip install gpiozero rpi-gpio lgpio

from gpiozero import PWMLED
from time import sleep

led = PWMLED(2)

i = 0
while i<10:
    led.value = 0
    #sleep(1)
    #led.value = 0.5
    sleep(1)
    led.value = 1
    sleep(1)
    i = i + 1
    print(i)